<template>
	<view class="newsDetail">	
		<web-view :src="src"></web-view>	
	</view>
</template>

<script>
var dateUtils = require('../../common/util.js').dateUtils;
var util = require('../../common/util.js');
export default {
	data() {
		return {
			src: ''
		};
	},
	onLoad(option) {
		this.src = '/hybrid/html/newsDetail.html?id=' + option.id;
		uni.showLoading({
			title: '加载中...'
		});
	},
	methods: {
		formatTime(timstamp) {
			// console.log(this.lastOrder.createTime)
			return util.formatTime(timstamp);
		},

		back() {
			uni.navigateBack({
				delta: 1
			});
		},

		shareWachat() {
			uni.share({
				provider: 'weixin',
				scene: 'WXSceneSession',
				type: 0,
				href: 'http://uniapp.dcloud.io/',
				title: 'uni-app分享',
				summary: '我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！',
				imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/uni@2x.png',
				success: function(res) {
					console.log('success:' + JSON.stringify(res));
				},
				fail: function(err) {
					console.log('fail:' + JSON.stringify(err));
				}
			});
		},
		shareFriend() {
			uni.share({
				provider: 'weixin',
				scene: 'WXSenceTimeline',
				type: 0,
				href: 'http://uniapp.dcloud.io/',
				title: 'uni-app分享',
				summary: '我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！',
				imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/uni@2x.png',
				success: function(res) {
					console.log('success:' + JSON.stringify(res));
				},
				fail: function(err) {
					console.log('fail:' + JSON.stringify(err));
				}
			});
		},
		shareWebo() {
			uni.share({
				provider: 'sinaweibo',
				scene: 'WXSenceTimeline',
				type: 0,
				href: 'http://uniapp.dcloud.io/',
				title: 'uni-app分享',
				summary: '我正在使用HBuilderX开发uni-app，赶紧跟我一起来体验！',
				imageUrl: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/images/uni@2x.png',
				success: function(res) {
					console.log('success:' + JSON.stringify(res));
				},
				fail: function(err) {
					console.log('fail:' + JSON.stringify(err));
				}
			});
		}
	}
};
</script>

<style lang="less">
@import '../../common/icon.css';
@import url('../../components/mpvue-wxparse/src/wxParse.css');
page {
	background: white;
}
.newsDetail {
	flex: 1;
	flex-direction: column;
	width: 100%;
	height: auto;
	padding-bottom: 120upx;
	.header {
		padding: 40upx;
		box-sizing: border-box;
		height: auto;
		justify-content: space-around;
		flex-direction: column;

		.title {
			line-height: 68upx;
			font-size: 48upx;
			color: #333333;
		}
		.header_meta {
			flex-direction: row;
			justify-content: flex-start;
			font-size: 24upx;
			color: #999999;
			margin-top: 10upx;
			.header_time {
				margin-right: 20upx;
			}
		}
	}
	.content {
		width: 100%;
		padding: 40upx;
		box-sizing: border-box;
		.wxParse {
			width: 100%;
			view {
				max-width: 100%;
				.p {
					max-width: 100%;
				}
			}

			flex-direction: column;
		}
	}
	.footer {
		background: white;
		width: 100%;
		height: 100upx;
		position: fixed;
		bottom: 0;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
		box-shadow: 0 0 0.277778rem #e8e6e6;
		.iconWrap {
			position: absolute;
			left: 60upx;
			padding: 20upx;
			display: flex;
			justify-content: center;
			align-items: center;
			// border: 1upx solid red;
			.arrow {
				color: #666666;
				font-size: 40upx;
			}
		}

		.share {
			// border: 1px solid red;
			width: 45%;
			justify-content: space-around;
			.imgWrap {
				width: 33%;
				justify-content: center;
				image {
					width: 40upx;
					height: 40upx;
				}
			}
		}
	}
}
</style>
